import { Input } from '@angular/core';
/*
 * @Author: your name
 * @Date: 2021-12-23 16:50:17
 * @LastEditTime: 2021-12-31 13:15:13
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \tms-obc-web\src\app\routes\ticket-management\components\invoice-requested\requested-detail\requested-detail.component.ts
 */
import { Component, OnInit } from '@angular/core';
import { TicketService } from '../../../services/ticket.service';


@Component({
  selector: 'app-requested-detail',
  templateUrl: './requested-detail.component.html',
  styleUrls: ['./requested-detail.component.less']
})
export class RequestedDetailComponent implements OnInit {
  i: any;
  status: any;
  Id: any;
  @Input() id: any;
  headerInfo: any;
  constructor(
    public service: TicketService,
  ) { }

  ngOnInit(): void {
    this.initData();
  }
  initData() {
    if(this.id) {
      this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.id }).subscribe(res => {
        if (res) {
          this.headerInfo = res;
        }
      });
    }
    if(this.Id) {
      this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.Id }).subscribe(res => {
        if (res) {
          this.headerInfo = res;
        }
      });
    }
 
  }

}
